//package com.folioreader.ui.view;
//
//import android.os.Bundle;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.view.ViewTreeObserver;
//
//import androidx.annotation.NonNull;
//import androidx.annotation.Nullable;
//
//import com.folioreader.Config;
//import com.folioreader.R;
//import com.folioreader.ui.activity.FolioActivity;
//import com.folioreader.ui.activity.FolioActivityCallback;
//import com.folioreader.util.AppUtil;
//import com.google.android.material.bottomsheet.BottomSheetBehavior;
//import com.google.android.material.bottomsheet.BottomSheetDialog;
//import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
//
//public class ConfigBottomSheetDialogFragmentNew extends BottomSheetDialogFragment {
//    private static  final int FADE_DAY_NIGHT_MODE = 500;
//    private Config config;
//    private boolean isNightMode= false;
//    private FolioActivityCallback activityCallback;
//
//    @Override
//    public  View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//        return inflater.inflate(R.layout.view_config, container);
//    }
//
//    @Override
//    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
//        super.onViewCreated(view, savedInstanceState);
//        if(getActivity() instanceof FolioActivity){
//            activityCallback= (FolioActivityCallback) getActivity();
//        }
//        getView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
//            @Override
//            public void onGlobalLayout() {
//                BottomSheetDialog dialog= (BottomSheetDialog) getDialog();
//                View bottomSheet= dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet);
//                BottomSheetBehavior behavior = BottomSheetBehavior.from(bottomSheet);
//                behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
//                behavior.setPeekHeight(0);
//            }
//        });
//        config = AppUtil.getSavedConfig(getActivity());
//        initViews();
//    }
//
//    @Override
//    public void onDestroy() {
//        super.onDestroy();
//        getView().getViewTreeObserver().addOnWindowAttachListener(null);
//    }
//    private void initViews(){
////        inflateView();
////        configFonts();
////        view_config_font_size_seek_bar;
//    }
//}
